﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Model.Interfaces;
using Utilities;

namespace AccManagerKw.Common
{
    public partial class FrmBase : Form
    {
        public ClsGlobalVarz.Mode Mode;

        public FrmBase()
        {
            InitializeComponent();
            SetMode(ClsGlobalVarz.Mode.Add);
        }

        public void SetMode(ClsGlobalVarz.Mode mode)
        {
            Mode = mode;
            lblMode.Text = string.Format(@"Mode: {0}", mode);
        }
        private void btnCancel_Click(object sender, EventArgs e)
        {
            try
            {
                ((ICrud)MdiParent.ActiveMdiChild).ResetData();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }
    }
}
